<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<script type="text/javascript">
    function page(n, s) {
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchForm").submit();
        return false;
    }
</script>

<section style="padding-top: 30px;" class="main-content col-lg-12" id="LeftDiv">
    <div class="table-responsive no-border">
        <div class="datatable-top">
            <div class="pull-left">
                <form:form id="searchFormDict" modelAttribute="patVisitIndex"
                           onsubmit="return loadDivForm('mainCenterDiv','searchFormDict','${ctx}/inpPatientInfo/Discharge');"
                           method="post" class="form-inline">
                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                    <label>科室：</label>:<sys:treeselect selectedParent="true" isnull="true" id="orgDeptId"
                                                       name="patVisit.deptAdmissionTo"
                                                       value=""
                                                       update="false"
                                                       labelName="${patVisitIndex.patVisit.deptAdmissionTo}"
                                                       labelValue="${fns:getDeptName(patVisitIndex.patVisit.deptAdmissionTo,'')}"
                                                       title="科室" url="/sys/orgDept/treeData"
                                                       extId="${orgDept.id}" cssClass="form-control"/>
                    <label>护理病区：</label>:<sys:treeselect selectedParent="true" method="selectDoctor"
                                                         id="wardAdmissionTo" name="patVisit.wardAdmissionTo"
                                                         value=""
                                                         update="false"
                                                         labelName="${patVisitIndex.patVisit.wardAdmissionTo}"
                                                         labelValue="${fns:getDeptName(patVisitIndex.patVisit.wardAdmissionTo,'')}"
                                                         title="科室" url="/sys/orgDept/treeData?clinicAttrs=2"
                                                         isnull="true"
                                                         extId="${orgDept.id}" cssClass="form-control"/>
                    <label>姓名：</label><form:input path="name" htmlEscape="false" maxlength="50" class="form-control"/>
                    <label>住院号：</label><form:input path="patVisit.visitNo" htmlEscape="false" maxlength="50"
                                                   class="form-control"/>
                    <label>费别</label>:<sys:select isNull="1" checkValue="${patVisitIndex.chargeType}"
                                                  className="form-control"
                                                  lists="${fns:getDictList('CHARGE_TYPE_DICT')}" name="chargeType">
                </sys:select>
                    &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                </form:form>
            </div>
        </div>
        <table id="contentTable" class="table table-bordered table-striped mg-t datatable">
            <thead>
            <tr>
                <th style="display:none">主键</th>
                <th style="display:none">patVisit主键</th>
                <%--<th>治疗类型</th>--%>
                <th>住院号</th>
                <th>姓名</th>
                <th>费用类别</th>
                <th>性别</th>
                <th>年龄</th>
                <th>出生日期</th>
                <th>出院科室</th>
                <th>出院病区</th>
                <th>床号</th>
                <th>入院时间</th>
                <th>出院时间</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${page.list}" var="list">
            <tr>
                <td style="display:none"> ${list.id}</td>
                <td style="display:none"> ${list.visitId}</td>
                <td>${list.patVisit.visitNo}</td>
                <td>${list.name}</td>
                <td>${fns:getDictLabels(list.chargeType,'CHARGE_TYPE_DICT','')}</td>
                <td>${fns:getDictLabels(list.sex,'SEX_DICT' ,'' )}</td>
                <td>${list.age}</td>
                <td><fmt:formatDate value="${list.birthdayDate}" pattern="yyyy-MM-dd" type="date"
                                    dateStyle="long"/></td>
                <td>${fns:getDeptName(list.patVisit.deptDischargeTo,'')}</td>
                <td>${fns:getDeptName(list.patVisit.wordDischargeTo,'')}</td>
                <td>${list.patVisit.bedNo}</td>
                <td><fmt:formatDate value="${list.patVisit.admissionDate}" pattern="yyyy-MM-dd hh:24:mm:ss" type="date"
                                    dateStyle="long"/></td>
                <td><fmt:formatDate value="${list.patVisit.dischargeDate}" pattern="yyyy-MM-dd hh:24:mm:ss" type="date"
                                    dateStyle="long"/></td>
            </tr>
            </c:forEach>

        </table>
        <div class="pagination">${page}</div>
    </div>
    </div>
</section>
